#ifndef MSGD_XHEAD_H
#define MSGD_XHEAD_H 1

#include <config.h>
#include <core.h>

struct xhead_s {
   msgd_uint_t ver:2;
   msgd_uint_t total_len;
   u_char      *op;
   u_char      *name;
   msgd_uint_t arg_len;
   char        *arg;
   char        *msg;
};


struct xhead_arg_s {
   char  interface_type[3];
   char  choose_call[3];
   char  exec_type[3];
   char  returnType[3];
   
   msgd_uint_t httpUrlsSize;
   msgd_uint_t httpCallBackSize;
   msgd_uint_t tcpPairSize;
   msgd_uint_t dupPairSize;
   char  **httpUrls;
   char  **httpCallBack;
   char  **tcpPair;
   char  **dupPair;
};


#ifdef __plusplus
extern "C" {
#endif

void msgd_read_xhead_request_line(msgd_event_t *ev);

void msgd_test_reading(msgd_event_t *ev);

#ifdef __plusplus
}
#endif

#endif //MSGD_XHEAD_H
